<!doctype html>
<html>
    <head>
        <title>登录注册</title>
        <!-- for-mobile-apps -->
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css"
              integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
              crossorigin="anonymous">
        <!-- //for-mobile-apps -->
        <link href="//fonts.googleapis.com/css?family=Abril+Fatface&amp;subset=latin-ext" rel="stylesheet">
        <link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700italic,700,400italic,300italic,300'
              rel='stylesheet' type='text/css'>
        <!-- font-awesome icons -->
        <link href="/static/css/font-awesome.css" rel="stylesheet" type="text/css">
        <!-- //font-awesome icons -->
        <link href="/static/css/style.css" rel="stylesheet" type="text/css" media="all"/>
        <script src="/static/js/jquery-2.1.4.min.js"></script>
        <script type="text/javascript">
            $(function () {

                //登录
                $("#login").click(function () {
                    $.ajax({
                        url: "/employees/login",
                        type: "post",
                        dataType: "text",
                        data: {
                            "username": $("#username1").val(),
                            "password": $("#pwd1").val()
                        },
                        success: function (result) {
                            if (result == "success") {
                                window.location.href = "/html/main.html";
                            } else {
                                alert("登录失败，请确认用户名或密码是否正确")
                            }
                        }
                    })
                });


            });

        </script>
    </head>
    <body>
        <div class="content" id="Main-Content">
            <div class="w3ls-slider">
                <div class="hub-slider">
                    <div class="hub-slider-slides">
                        <ul>
                            <li>
                                <div class="login-form login-form-left">
                                    <div class="agile-row">
                                        <h2>登录</h2>
                                        <div class="login-agileits-top">
                                            <div>
                                                <p>UserName</p>
                                                <input type="text" class="name" id="username1"/>
                                                <p>Password</p>
                                                <input type="password" class="password" id="pwd1"/>
                                                <input type="button" value="登录" id="login">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

            <!-- //copyright -->
            <script type="text/javascript" src="/static/js/hubslider.js"></script>

        </div>
    </body>
</html>
